/*
 * @Author: lihaonan
 * @Date: 2024-06-24 15:05:25
 * @LastEditors: lihaonan
 * @LastEditTime: 2024-07-28 17:35:15
 * @Description: 动态
 */
const BASE_URL_EXCEPTION = "/app";
import http from "@/utils/http";
import fly from "@/utils/http";
// 动态列表
export const getMomentList = (params: {}) => {
    return http.get(`${BASE_URL_EXCEPTION}/moment/turn`, params);
};

// 通告列表
export const getPolling = (params: {}) => {
    return http.get(`${BASE_URL_EXCEPTION}/polling`, params);
};

// 新增动态
export const addMoment = (data: {}) => {
    return http.post(`${BASE_URL_EXCEPTION}/moment`, data);
};
// 喜欢列表
export const likeList = (data: {}) => {
    return http.get(`${BASE_URL_EXCEPTION}/like/list`, data);
};
// 添加喜欢
export const addLike = (data: {}) => {
    return http.post(`${BASE_URL_EXCEPTION}/like`, data);
};
// 取消喜欢
export const delLike = (id: string) => {
    return http.delete(`${BASE_URL_EXCEPTION}/like/${id}`);
};
// 评论列表
export const commentList = (data: {}) => {
    return http.get(`${BASE_URL_EXCEPTION}/comment/list`, data);
};
// 评论添加
export const addComment = (data: {}) => {
    return http.post(`${BASE_URL_EXCEPTION}/comment`, data);
};
// 评论删除
export const delComment = (id: string) => {
    return http.delete(`${BASE_URL_EXCEPTION}/comment/${id}`);
};
// 关注
export const addFollow = (data: {}) => {
    return http.post(`${BASE_URL_EXCEPTION}/follow-rel`, data);
};
// 取关
export const delFollow = (id: string) => {
    return http.delete(`${BASE_URL_EXCEPTION}/follow-rel/${id}`);
};